<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>主体一</title>
		<link rel="stylesheet" type="text/css" href="{$webSite}public/css/base.css">
	</head>

	<style>
		/*****		版块 顶部.body_top 开始	***********/
		.body_top{
			width:960px;
			height:30px;
			background:#fff;
			margin: 0 auto;
		}
		.body_top_ul{
			width:380px;
			height:30px;
			float:right;
		}
		.body_top_border{
			width:1px;
			height:14px;
			background:#CFCFDA;
			margin-top:10px;
		}
		.body_top_font , .body_top_border{
			float:right;
			margin-right:10px;
			margin-top:10px;

		}

		/*****		版块.body 开始	***********/
		.body{
			width:960px;
			min-height:300px;
			background:#fff;
			margin: 0 auto;
			border:1px #ccc solid;
			margin-top:10px;
		}
		/*****		版块头部 body_head	***********/
		.body_head{
			width:960px;
			height:40px;
			background:#EDF2F5;
		}
		.body_head span{
			display:block;
			width:200px;
			height:40px;
			line-height:40px;
			font-size:16px;
			font-weight:bold;
			color:#336699;
			white-space:nowrap;
			text-overflow:ellipsis;
			overflow:hidden; 
		}
		.body_head span:hover{
			text-decoration:underline;
			color:orange;

		}
		
		/*****		版块内容主体 body_main	***********/
		.body_main{
			width:940px;
			height:60px;
			margin: 0 auto;
			border-bottom:#ccc 1px dashed;
		}
		/****	版块图标	**/
		.body_main_pic{
			width:50px;
			height:50px;
			float:left;
			margin-top:10px;
		}

		/****	版块标题 , 版主信息	**/
		.body_main_category{
			width:100px;
			height:50px;
			float:left;
			margin-top:10px;
		}
		.body_main_category_title{
			display:block;
			width:150px;
			height:30px;
			font-size:14px;
			font-weight:bold;
			line-height:30px;
			white-space:nowrap;
			text-overflow:ellipsis;
			overflow:hidden; 
		}
		.body_main_category_admin{
			width:130px;
			height:20px;		
		}

		/****	版块数量统计	**/
		.body_main_num{
			width:70px;
			height:50px;
			float:left;
			margin-left:450px;
			line-height:50px;
			margin-top:10px;
			color:#336699;
		}

		/****	版块置顶信息	**/
		.body_main_title{
			width:230px;
			height:50px;
			float:left;
		 	white-space:nowrap;
			text-overflow:ellipsis;
			overflow:hidden; 
			margin-left:30px;
			margin-top:10px;
		}
		.body_main_title_head{
			width:230px;
			height:20px;
			color:#336699;
		}
		.body_main_title_time{
			width:230px;
			height:20px;
		}
		
	</style>

	<body>
		<!-- 主体的提示 -->
		<div class="body_top clearFix">
			<ul class="body_top_ul clearFix">
				
				<li class="body_top_font">欢迎新会员: {$lastUser[0]['username']}</li>
				<li class="body_top_border"></li>
				<li class="body_top_font">会员: {$userCount}</li>
				<li class="body_top_border"></li>
				<li class="body_top_font">帖子: {$postCount}</li>
				<li class="body_top_font">
					<img src="{$webSite}public/images/body_top.png">
				</li>
			</ul>

		</div>


		<!-- 第一部分 -->
		<div class="body">
			

			<!-- 遍历大板块 -->
			{if $resBody}
			{foreach $resBody as $value}
		<!-- 接收bigId , 显示对应大版块 -->
		{if $bigId == $value['cid']  ||   !$bigId}

				{if $value['parentid'] == 0}
			<!-- 版块头部 body_head -->
			<div class="body_head">
				<a href="{$webSite}index.php?bigId={$value['cid']}">
					<span>&nbsp;&nbsp;&nbsp;{$value['classname']}</span>
				</a>
			</div>
				{/if}
			
			<!-- 遍历小版块 -->
			{foreach $resBody as $val}
				{if  $val['parentid'] ==  $value['cid']}
			<!-- 版块主体 body_main -->
			<div class="body_main clearFix">
				<!-- 版块图标 -->
				<div class="body_main_pic">
					<a href="{$webSite}index.php">
					 	<img src="{$webSite}public/images/body.png">
					 </a>
				</div>
				
				<!-- 版块标题 , 版主信息 -->
				<div class="body_main_category">
					
					<span class="body_main_category_title">
						<a href="{$webSite}public.php?cid={$val['cid']}">{$val['classname']}</a>
					</span>
					<div class="body_main_category_admin">版主: {$val['compere']}</div>
					
				</div>
				
				<!--  版块数量统计 (回复数/帖子数) -->
				<div class="body_main_num">
					<span>{$val['replycount']}</span> / <span>{$val['motifcount']}</span>
				</div>
				
				<!-- 版块置顶信息 -->
				<div class="body_main_title clearFix">

					<!-- 置顶帖 -->
					{if $resTop}
					{foreach $resTop as $valTop}
						{if $valTop['classid'] == $val['cid']}
					<p class="body_main_title_head">
						<a href="{$webSite}detail.php?id={$valTop['id']}" style="color:#336699;">{$valTop['title']}</a>
					</p>
					
					<p class="body_main_title_time"> {$t=date('Y-m-d H:i:s', $valTop['addtime'])}&nbsp;&nbsp;

					<!-- 置顶帖的用户 -->
					{if $resUser}
						{foreach $resUser as $valUser}
						{if $valUser['uid'] == $valTop['authorid']}
					<span>{$valUser['username']}</span>
						{/if}
						{/foreach}
					{/if}

					</p>	

						{/if}
					{/foreach}
					{/if}
				</div>
			</div>
				{/if}
			{/foreach}
		{/if}
			{/foreach}
			{/if}
		
		</div>

		
	</body>
</html>